<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2d-平移</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background: red;
            transition: all 2s;
            /* margin: 10px auto; */

            transform: translateX(50px);
            /* 静态右移50px */
        }
        div:hover{
            /* transform:translateX(100px) translateY(100px); */
            transform: translate(100px,100px);
            /* translate(X,Y) */
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>